package com.fpost.manager;

import java.util.List;

import org.hibernate.HibernateException;

import com.fpost.dao.impl.ArticleTypeDAO;
import com.fpost.dao.impl.UserDAO;
import com.fpost.domain.ArticleType;
import com.fpost.domain.User;

public class ArticleTypeManager {
	
	public Long save(ArticleType articleType) throws HibernateException {
		ArticleTypeDAO dao = new ArticleTypeDAO();
		return dao.save(articleType);		
	}

	public void saveOrUpdate(ArticleType articleType) throws HibernateException {
		ArticleTypeDAO dao = new ArticleTypeDAO();
		dao.saveOrUpdate(articleType);
	}

	public void delete(long id) throws HibernateException {
		ArticleTypeDAO dao = new ArticleTypeDAO();
		dao.delete(id);
		
	}

	public ArticleType get(long id) throws HibernateException {
		ArticleTypeDAO dao = new ArticleTypeDAO();
		return dao.get(id);
	}
	
	public List<ArticleType> getAll() throws HibernateException {		
		ArticleTypeDAO dao = new ArticleTypeDAO();
		return dao.getAll();
	}
	
}
